using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SystemWnioskujacy.Exceptions {
    public class KeywordNotExistsException : SyntaxErrorException {
        public static string MESSAGE = SyntaxErrorException.MESSAGE + " Keyword does not exists!";

        public KeywordNotExistsException() : base(MESSAGE) {
        }

		/// <summary>
		///	Generate message about incorrect keyword, that not exists.
		/// </summary>
		/// <param name="keyword">Name of keyword.</param>
        public KeywordNotExistsException(string keyword)
            : base(GenerateMessage(keyword))
		{
        }

		/// <summary>
		///	Generate message about incorrect keyword, that not exists and contains another exception.
		/// </summary>
		/// <param name="keyword">Name of keyword.</param>
		/// <param name="inner">Inner exception.</param>
        public KeywordNotExistsException(string keyword, Exception inner)
            : base(GenerateMessage(keyword), inner) {
        }
		
		/// <summary>
		///	Generate message about incorrect keyword, that not exists.
		/// </summary>
		/// <param name="keyword">Name of keyword.</param>
		private static string GenerateMessage(string keyword) {
            return string.Format(SyntaxErrorException.MESSAGE + " Keyword \"{0}\" does not exists!", keyword);
		}
    }
}

